package cn.aws360.boot.system.api.pojo.request;

import cn.aws360.boot.base.api.validation.ValidationGroup;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author junnan
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("系统用户-写入实例")
public class SysUserWrite {

    @ApiModelProperty(value = "用户 id, 修改时为必传")
    @NotNull(message = "用户 id 不能为空", groups = {ValidationGroup.edit.class})
    private Integer id;

    @ApiModelProperty(value = "部门 id", required = true)
    @NotNull(message = "部门 deptId 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private Integer deptId;

    @ApiModelProperty(value = "登录名称", required = true)
    @NotBlank(message = "登录名称 username 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String username;

    @ApiModelProperty(value = "用户昵称")
    private String nickname;

    @ApiModelProperty(value = "用户邮箱", required = true)
    @NotBlank(message = "用户邮箱 email 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String email;

    @ApiModelProperty(value = "用户手机", required = true)
    @NotBlank(message = "用户手机 mobile 不能为空", groups = {ValidationGroup.add.class, ValidationGroup.edit.class})
    private String mobile;

    @ApiModelProperty(value = "是否锁定")
    private Integer lokFlag;

    @ApiModelProperty(value = "角色 roleIds")
    private String roleIds;

}
